<?php include "../public/header.php";?>
<?php include "../public/header_show.php";?>
<body id="xiangqingPage">
<div id="xiangqingBox">
    <div class="page-title">
        <div class="page-title-con">
            <span class="pageshowtitle">详情</span>
            <div class="page-title-opt-list">
                <?php include "../public_flow/flow_show_optbut.php";?>
                <button class="layui-btn layui-btn-sm btn-light marginr5 opt">
                    操作<i class="layui-icon layui-icon-down layui-font-12"></i>
                </button>
                <span id="page-close" class="page-close" onclick="layer_close()">×</span>
            </div>
        </div>
    </div>
    <div class="main-container">

        <div><?php include "../public_flow/flow_show_info.php";?></div>

        <div class="table-box tablenes">
            <div class="title">基本信息</div>
            <table class="layui-table">
                <tbody>
                <tr><td class="tt">项目名称</td><td id="enginname" class="colorlan tv"></td><td class="tt">合同名称</td><td id="shi_name" class="colorlan tv"></td></tr>
                <tr><td class="tt">建设单位</td><td id="shi_faer" class="tv"></td><td class="tt">施工单位</td><td id="shi_chenger" class="tv"></td></tr>
                <tr><td class="tt">合同金额(元)</td><td id="shi_money" class="tv"></td><td class="tt">签证金额(元)</td><td id="qian_money" class="tv"></td></tr>
                <tr><td class="tt">产值金额(元)</td><td id="chan_money" class="tv"></td><td class="tt">回款金额(元)</td><td id="hui_money" class="tv"></td></tr>
                <tr><td class="tt">送审日期</td><td id="songdt" class="tv"></td><td class="tt">送审金额(元)</td><td id="songfee" class="tv"></td></tr>
                <tr><td class="tt">审计单位</td><td id="shen_unit" class="tv"></td><td class="tt">审定日期</td><td id="shendt" class="tv"></td></tr>
                <tr><td class="tt">审定金额(元)</td><td id="money" class="tv"></td><td class="tt">审定差额(元)</td><td id="shencha" class="tv"></td></tr>
                <tr><td class="tt">奖励金额(元)</td><td id="jiangfee" class="tv"></td><td class="tt">处罚金额(元)</td><td id="fafee" class="tv"></td></tr>
                <tr><td class="tt">质保期</td><td id="zhidt" class="tv"></td><td class="tt">质保金(元)</td><td id="zhifee" class="tv"></td></tr>
                <tr><td class="tt">其他扣除款(元)</td><td id="qifee" class="tv"></td><td class="tt">应付余款(元)</td><td id="yufee" class="tv"></td></tr>
                <tr><td class="tt">备注</td><td class="tv" id="explain" colspan="3"></td></tr>
                </tbody>
            </table>
        </div>

        <div><?php include "../public/upinfo_show.php";?></div>

        <div><?php include "../public_flow/flow_show_flowrelas.php";?></div>


        <div class="table-box tablenes">
            <script type="text/html" id="toolbarDemo">结算明细</script>
            <div class="tableShow">
                <table id="datalist" lay-filter="datalist"></table>
            </div>
        </div>

        <div><?php include '../public_flow/flow_show_shenlog.php'?></div>
        <div><?php include '../public_flow/flow_show_talk.php'?></div>
        <div><?php include '../public/opt_browse.php'?></div>
    </div>
</div>
<script>
    var param_id = getQueryVariable('id') || 0;

    layui.use(['form', 'layer', "laytp",'element','dropdown','laypage','table','soulTable'], function() {
        var laypage = layui.laypage, table = layui.table, dropdown = layui.dropdown, form = layui.form, soulTable = layui.soulTable,element = layui.element;

        facade.ajax({url: ask_engin_junjie_show, data:{id: param_id}}).done(function(res){
            if (res.code === 2000) {
                var data = res.data.data;
                var engininfo = res.data.engininfo;
                var shiinfo = res.data.shiinfo;

                $("#enginname").text(engininfo.name).click(function () {
                    openPage('../engin/show.php?id='+engininfo.id);
                });

                $("#shi_name").text(shiinfo.name).click(function () {
                    openPage('../contract_shi/show.php?id='+shiinfo.id);
                });
                $("#shi_faer").text(shiinfo.faer);
                $("#shi_chenger").text(shiinfo.chenger);



                $("#shi_money").text(data.shi_money);
                $("#qian_money").text(data.qian_money);
                $("#chan_money").text(data.chan_money);
                $("#hui_money").text(data.hui_money);
                $("#songdt").text(data.songdt);
                $("#songfee").text(data.songfee);
                $("#shen_unit").text(data.shen_unit);
                $("#shendt").text(data.shendt);
                $("#money").text(data.money);
                $("#shencha").text(data.shencha);
                $("#jiangfee").text(data.jiangfee);
                $("#fafee").text(data.fafee);
                $("#zhidt").text(data.zhidt);
                $("#zhifee").text(data.zhifee);
                $("#qifee").text(data.qifee);
                $("#yufee").text(data.yufee);
                $("#explain").text(data.explain);


                var mytableList = table.render({
                    elem: "#datalist",data:res.data.list, toolbar: '#toolbarDemo', page: false
                    ,limit:TabInitShow.limit,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                    ,defaultToolbar: TabInitShow.defaultToolbar,filter: TabInitShow.filter ,text: TabInitShow.text
                    ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                    , cols: [[
                        {type:'numbers',title:'序号',fixed:'left'}
                        ,{field: 'num', title: '清单编号'}
                        ,{field: 'name', title: '分部名称'}
                        ,{field: 'xiang', title: '分项名称'}
                        ,{field: 'unit', title: '单位'}
                        ,{field: 'bulk', title: '工程量'}
                        ,{field: 'price', title: '综合单价(元)'}
                        ,{field: 'wannum', title: '完成量'}
                        ,{field: 'jienum', title: '结算量'}
                        ,{field: 'heprice', title: '合价(元)'}
                        ,{field: 'explain', title: '备注'}
                    ]]
                    , done: function (res) {
                        soulTable.render(this);
                    }
                });


                public_flow_show_display(res.data.billinfo);
                public_upload_show_file('upload_files', res.data.files);
                render_from();
            }
        });

        public_get_readsandlog('engin_junjie', param_id);
    });



</script>
</body>
</html>




